package m.jclecai.com.adapter.holder;

import android.content.Context;
import android.support.annotation.LayoutRes;
import android.widget.TextView;

import m.jclecai.com.R;

import butterknife.BindView;

/**
 * Created by ZD on 2017/5/9.
 */

public class MyLotteryPopHolder extends ViewHolder {
    @BindView(R.id.txt_hemai_popuwindow)
    TextView txt_hemai_popuwindow;

    public MyLotteryPopHolder(Context context, @LayoutRes int resource) {
        super(context, resource);
    }

    public void init(String name,String type,boolean isSelected){
        txt_hemai_popuwindow.setText(name);
        txt_hemai_popuwindow
                .setBackgroundResource(
                        isSelected ? R.drawable.hemai_popuwindow_txt_bg_press :
                        R.drawable.hemai_popuwindow_txt_bg);
        //给每一个条目上的TextView添加标记
        txt_hemai_popuwindow.setTag(type);
    }
}
